<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');
?>	
<form name="myform" action="<?php echo U('delete'); ?>" method="post">
<div class="pad-10">
	<div class="explain-col">
		<strong>温馨提醒</strong><br>
		每条记录只允许审核一次（无论是否成功、失败）,<font color="red">当审核成功时，系统会自动将该体验任务的奖励给用户，无需手动奖励给用户积分。</font>
	</div>
	<div class="bk10"></div>
	<div class="table-list">
		<table width="100%" cellspacing="0">
			<thead>
				<tr>
					<th width="30" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th>
					<th>ID</th>
					<th>所属任务</th>
					<th align="center">所属用户</th>
					<th align="center">当前状态</th>
					<th align="center">提交信息</th>    
					<th align="center">提交时间</th>   
					<th align="center">处理时间</th>
				</tr>
			</thead>
		<tbody>
		<?php foreach ($infos as $info): ?>
		<tr>
   			<td align="center"><input type="checkbox" name="id[]" value="<?php echo $info['id']?>"></td>
			<td align="center"><?php echo $info['id'];?><input type="hidden" name="userid" value="7"></td>
			<td align="center"><?php echo $document_info[$info['ad_id']];?></td>
			<td align="center"><?php echo $member_info[$info['uid']]['username'];?><?php if ($member_info[$info['uid']]['nickname']): ?>(<?php echo $member_info[$info['uid']]['nickname'] ?>)<?php endif ?></td>
			<td align="center"><?php echo $status_conf[$info['status']] ?></td>
			<td align="center"><?php echo $info['content'];?></td>
			<td align="center"><?php echo dgmdate($info['dateline']);?></td>
			
			<td align="center">
				<?php if ($info['updatetime']): ?>
					<?php echo dgmdate($info['updatetime']);?>
				<?php else: ?>
				<a href="<?php echo U('status', array('id' => $info['id'], 'state' => '-1', 'dosubmit' => 'true')) ?>" onclick="return confirm('您确定要标注失败吗？');">失败</a> |
				<a href="<?php echo U('status', array('id' => $info['id'], 'state' => '1', 'dosubmit' => 'true')) ?>" onclick="return confirm('您确定要标注成功吗？系统会自动给会员发放奖励');">成功</a>
				<?php endif ?>
			</td>
		</tr>
		<?php endforeach ?>
		</tbody>
	</table>
	<div class="btn"><label for="check_box"><?php echo L('selected_all')?>/<?php echo L('cancel')?></label>&nbsp;&nbsp;<input name="dosubmit" type="submit" class="button" value="批量删除" onClick="return confirm('<?php echo L('确定删除选定的记录？')?>')">&nbsp;&nbsp;</div>
    <div id="pages"><?php echo $pages ?></div>
</div>
</div>
</form>
</body>
</html>
<script type="text/javascript">
window.top.$('#display_center_id').css('display','none');
function edit(id, title) {
  window.top.art.dialog({id:'edit'}).close();
  window.top.art.dialog({title:'<?php echo L('cash_info')?>--'+title, id:'edit', iframe:'?m=Document&c=Cash&a=update&id='+id ,width:'500px',height:'250px'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;
  var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
}
function deletes(id){
  if(confirm("<?php echo L('affirm_delete')?>") == true){
	window.location.href = "?m=Document&c=Cash&a=delete&id="+id;
  }
}
</script>
